# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-editor
_pkgname=python-editor
pkgver=1.0.4
pkgrel=4
pkgdesc='Programmatically open an editor, capture the result.'
url='https://pypi.org/project/python-editor/#files'
arch=('any')
license=('Apache')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('c8ce2403bfe6c93935c7f4c384a8618a39cdaefe1ff5b1ff2cf4562866d8b3caa616e428c0a1634a56db934caeb474e7f84f8d5e009b9ed664189fdece8146f6')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

